package com.lagou.niancheng.lagouserviceuser.ext;

import com.lagou.niancheng.lagou.service.common.Result;
import com.lagou.niancheng.lagouserviceuser.ext.defaults.DefaultExtCodeService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * com.lagou.niancheng.lagouserviceuser.ext.ExtCodeService
 *
 * @author 大犬
 * @date 2020/6/28
 */
@FeignClient(value = "code-server", fallback = DefaultExtCodeService.class)
public interface ExtCodeService {
    /**
     * 校验验证码
     *
     * @param email 邮件
     * @param code  验证码
     * @return 返回校验结果
     */
    @PostMapping("/code/validate/{email}/{code}")
    Result verifyCode(@PathVariable("email") String email,
                      @PathVariable("code") String code);
}
